Fix also the other place where maskstride was calculated.
authorTor Lillqvist <tml@src.gnome.org>
Mon, 7 Nov 2005 12:05:43 +0000 (12:05 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 7 Nov 2005 12:05:43 +0000 (12:05 +0000)
gdk/win32/gdkcursor-win32.c

index ea82597385c9f3a889606f071e3019690fab325a..27bfd20c0cc6feaafbab2553fbb0a729c0834f81 100644 (file)
@@ -683,11 +683,7 @@ pixbuf_to_hbitmaps_alpha_winxp (GdkPixbuf *pixbuf,
     }
 
   /* MSDN says mask rows are aligned to "LONG" boundaries */
-  maskstride = width / 8;
-  if (maskstride % 4 != 0)
-    maskstride += 4 - (maskstride % 4);
-  if (maskstride < 4)  /* one word minimum */
-    maskstride = 4;
+  maskstride = (((width + 31) & ~31) >> 3);
 
   indata = gdk_pixbuf_get_pixels (pixbuf);
   rowstride = gdk_pixbuf_get_rowstride (pixbuf);